﻿@model IEnumerable<MobileSales.Model.Employees.Employee>

@{
    View.Title = Strings.Employees;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Employees</h2>

<p>
    @Html.ActionLink(Strings.CreateNew, "Create", null, new { @class = "icon-button add-icon" })
</p>
<table class="datatable">
    <thead>
    <tr>
        <th style="width:190px"></th>
        <th>
            @ModelStrings.Login
        </th>
        <th>
            @ModelStrings.Email
        </th>
        <th>
            @ModelStrings.Firstname
        </th>
        <th>
            @ModelStrings.Lastname
        </th>
        <th>
            @ModelStrings.Street<br />
            @ModelStrings.Zipcode<br />@ModelStrings.City
        </th>
        <th>
            @ModelStrings.Phone
        </th>
    </tr></thead>
    <tbody>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink(Strings.Edit, "Edit", new { id=item.Id },new { @class = "icon-button edit-icon" }) |
            @Html.ActionLink(Strings.Details, "Details", new { id = item.Id }, new { @class = "icon-button details-icon" })<br /><br />
            @Html.ActionLink(Strings.Delete, "Delete", new { id=item.Id }, new { @class = "icon-button delete-icon" })
        </td>
        <td>
            @item.Login
        </td>
        <td>
            @item.Email
        </td>
        <td>
            @item.Firstname
        </td>
        <td>
            @item.Lastname
        </td>
        <td>
        @item.Street<br />
            @item.Zipcode, 
            @item.City
        </td>
        <td>
            @item.Phone
        </td>
    </tr>
}
</tbody>
</table>

